﻿using CommerceOne.Domains.Repositories;
using CommerceOne.Domains.SqlRepositories;

namespace CommerceOne.Widgets.LeftCategoryNav
{
    public class LeftCategoryNavController
    {
        private readonly ICategoryRepository _context = new SqlCategoryRepository();

        public LeftCategoryNavController()
        {
        }

        public LeftCategoryViewModel GetViewModel()
        {
            LeftCategoryViewModel viewModel = new LeftCategoryViewModel();
            viewModel.CategoryList = this._context.GetAll();
            viewModel.Title = "Category";
            return viewModel;
        }
    }
}